package com.aqielife.demo.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import static com.aqielife.demo.MQConstant.QUEUE_FANOUT;

/**
 * @author aqie
 * @date 2022/02/06 17:14
 * @desc
 */
@Slf4j
@Component
public class PublishReceiveListener {

  @RabbitListener(queues = QUEUE_FANOUT)
  public void receiveMsg(String msg) {
    log.info("fanout 接收到消息：" + msg);
  }

}
